@extends('admin.index.layout')

@section('title',$title)

@section('content')

<!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                用户管理
                <small>添加</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 主页</a></li>
                <li><a href="#">用户列表</a></li>
                <li class="active">查看</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">查看用户</h3>
                        </div><!-- /.box-header -->
                        <!-- form start -->
                        <table border="1" align="center" cellpadding="0" cellspacing="5" width="100%">
                            <tr align="center" style="height: 50px;">
                                <td>序号</td>
                                <td>昵称</td>
                                <td>头像</td>
                                <td>邮箱</td>
                                <td>用户等级</td>
                                <td>操作</td>
                            </tr>
                            @foreach($row as $v)
                                    
                                <tr align="center">
                                    <td>{{$v -> id}}</td>
                                    <td>{{$v -> nickname}}</td>
                                    <td><img src="/uploads/yhtx/{{$v -> pic}}" width="50" alt=""></td>
                                    <td>{{$v -> email}}</td>
                                    <td>
                                        @if($v -> status == 0)
                                        
                                            管理员

                                        @elseif ($v -> status == 1) 
                                            
                                            普通用户

                                        @else
                                                    
                                            会员用户

                                        @endif

                                    </td>
                                    <td><a href="{{asset('admin/user/update?id=')}}{{($v -> id)}}">编辑</a> | <a href="{{asset('admin/user/delete?id=')}}{{($v -> id)}}">删除</a></td>
                                </tr>
                               
                            @endforeach
                        </table>
                    </div><!-- /.box -->

        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
    <script type="text/javascript">
    	window.onload = function()
    	{
    		setInterval(function(){
    			$("#warning").fadeOut();
    		},1000);
    	}
    </script>

@endsection
